package com.azusa.xbjy.entity;

import javax.persistence.Id;

public class Favorite {
    private int uId;

    @Id
    @javax.persistence.Column(name = "u_id", table = "favorite", nullable = false)
    public int getuId() {
        return uId;
    }

    public void setuId(int uId) {
        this.uId = uId;
    }

    private int aId;

    @Id
    @javax.persistence.Column(name = "a_id", table = "favorite", nullable = false)
    public int getaId() {
        return aId;
    }

    public void setaId(int aId) {
        this.aId = aId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Favorite favorite = (Favorite) o;

        if (uId != favorite.uId) return false;
        if (aId != favorite.aId) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = uId;
        result = 31 * result + aId;
        return result;
    }
}
